// 导入request, 用于发送axios请求
import request from '@/utils/request'

// 注册接口
export const doctorRegisterService = ({
  account,
  password
}) =>
  request.post('/doctor/register', { account, password })

// 登录接口
export const doctorLoginService = ({ account, password }) =>
  request.post('/doctor/login', { account, password })

// 获取医生信息接口
export const getDoctorInfoService = () =>
  request.get('/doctor/info')

// 删除医生
export const deleteDoctorService = (doctor) =>
  request.post('/doctor/deleteDoctor', doctor)

// 上传医生图片
export const doctorUploadImageService = (picture) =>
  request.patch('/doctor/uploadImage', { picture })

// 修改医生信息接口
export const doctorupdateDoctorInfoService = (data) =>
  request.put('/doctor/updateInfo', data)

// 判断医生信息是否完善
export const doctorIsInfoCompleteService = () =>
  request.get('/doctor/isComplete')

/**
 * 获取所有医生接口
 */
export const getAllDoctorsService = (data) =>
  request.get('/doctor/list', {
    params: data
  })

/**
 * 修改医生信息
 */
export const updateDoctorInfoService = (data) =>
  request.put('/doctor/updateOtherInfo', data)
